package com.aldobucchi.core.comparison
{
	
	import com.aldobucchi.core.comparison.ordered.IOrderedComparator;
	import com.aldobucchi.core.comparison.ordered.impl.CaseInsensitiveOrderedComparator;
	import com.aldobucchi.core.comparison.result.Equal;
	import com.aldobucchi.utils.AbstractTest;
	
	
	/**
	 * 
	 * @author aldo.bucchi@gmail.com
	 * 
	 */
	public class ComparisonFrameworkTest extends AbstractTest
	{
	

  		public function testDefaultComparator( ):void
  		{	
  			
   			assertTrue( "", ComparisonUtil.compare( "a", "a" )	is Equal );	
   			
   			assertTrue( "", ComparisonUtil.compare(  1,    1 )	is Equal );	
	
  		}
		
		
  		public function testCaseInsensitiveOrderedComparator():void
  		{	
  			
  			var c:IOrderedComparator = new CaseInsensitiveOrderedComparator( );
	
   			assertTrue( " 'a' , 'a' ", c.compare( "a", "a" ).isEqual );
   				
   			assertTrue( " 'a' , 'A' ", c.compare( "a", "A" ).isEqual );	
   			
   			assertTrue( " 1 , 1 ", c.compare( 1, 1 ).isEqual );	
	
  		}
  		
		
	}
	
}